package org.springblade.app.feign.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zhangyr
 * @version 1.0
 * @date 2022-08-24 9:53
 * @description 子应用实体类
 */
@Data
public class SubAppInfoEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	@JsonSerialize(
		using = ToStringSerializer.class
	)
	@ApiModelProperty("主键id")
	@TableId(
		value = "id",
		type = IdType.ASSIGN_ID
	)
	private Long id;

	/**
	 * 应用编号
	 */
	@ApiModelProperty(value = "应用编号")
	private String appId;
	/**
	 * 应用名称
	 */
	@ApiModelProperty(value = "应用名称")
	private String name;
	/**
	 * 应用描述
	 */
	@ApiModelProperty(value = "应用描述")
	private String describe;
	/**
	 * 拥有者(最高级，可管理管理员集合)
	 */
	@ApiModelProperty(value = "拥有者(最高级，可管理管理员集合)")
	@JsonSerialize(
		using = ToStringSerializer.class
	)
	private Long ownerId;

	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty("创建时间")
	private Date createTime;

	@JsonSerialize(
		using = ToStringSerializer.class
	)
	@ApiModelProperty("创建人")
	private Long createUser;
	/**
	 * 排序
	 */
	@ApiModelProperty(value = "排序")
	private Integer sort;

	/**
	 * 是否删除
	 */
	@ApiModelProperty(value = "是否删除")
	private Integer isDeleted;

	/**
	 * logo
	 */
	@ApiModelProperty(value = "logo")
	private String logo;

	/**
	 * 应用别名
	 */
	@ApiModelProperty(value = "应用别名")
	private String alias;
}
